import type { VNode } from 'vue';
import { ElNotification } from 'element-plus';

interface IENProps {
    title: string;
    message: string | VNode;
    type: 'success' | 'warning' | 'info' | 'error';
    duration?: number;
}
const notify = ({ title, message, type, duration = 3000, ...options }: IENProps) => {
    return ElNotification({
        title,
        message,
        type,
        duration,
        ...options,
    });
};

export default notify;
